﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HTHMachineVision
{
    /// <summary>
    /// 标定状态
    /// </summary>
    [Serializable]
    public enum CalibrationState
    {
        none = -1,
        机器人回零,
        等待机器人回零完成,
        等待机器人到标定点,
        等待图像处理完成,
        等待到达标定旋转中心位置,
        等待五点标定图像处理完成,
        标定完成,
    }

    /// <summary>
    /// 标定项
    /// </summary>
    [Serializable]
    public enum CalibrationProject
    {
        none = 0,
        九点标的,
        旋转中心标定
    }

    [Serializable]
    public enum Auto_取放料
    {
        none = -1,
        机器人回零,
        等待机器人回零完成,
        触发拍照,
        等待取料信号,
        等待机器人放料完成,
        完成,
    }


    /// <summary>
    /// 状态类
    /// </summary>
    [Serializable]
    public class State
    {
        //标定状态
        public static CalibrationState auto_标定状态 = CalibrationState.none;
        public static Auto_取放料 auto_取放料 = Auto_取放料.none;
        public static bool isStartCalib_开始标定 = false;
        public static bool done_机器人到达标定点 = false;
        public static bool done_图像处理完成 = false;
        public static bool isStart_标定取图 = false;
        public static bool isAutoRun_自动运行 = false;
        public static bool isTsetHand_手动测试 = false;
        public static CalibrationProject currentCB_当前标定项 = CalibrationProject.none;


    }

    /// <summary>
    /// 坐标点
    /// </summary>
    [Serializable]
    public class Point
    {
        public static double pointX_机器人当前坐标 = 0;
        public static double pointY_机器人当前坐标 = 0;
        public static double pointU_机器人当前角度 = 0;

        public static int point9Index = 0; //九点标定数据下标
        public static int rotate5Index = 0;
    }

    /// <summary>
    /// 命令类
    /// </summary>
    [Serializable]
    public class Command {

        //机器人命令指令
        public static string robot_走点位 = "1";
        public static string robot_回原点 = "0";
        public static string robot_取放料 = "2";
        public static string robot_当前点 = "4";
        public static string data_机器人完成信号 = "Done";
    }
}
